\(\int (f+\frac {g}{x}) (A+B \log (e (\frac {a+b x}{c+d x})^n)) \, dx\) [3]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 30, antiderivative size = 143 \[ \int \left (f+\frac {g}{x}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=A f x-B g n \log (x) \log \left (1+\frac {b x}{a}\right )+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}+g \log (x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-\frac {B (b c-a d) f n \log (c+d x)}{b d}+B g n \log (x) \log \left (1+\frac {d x}{c}\right )-B g n \operatorname {PolyLog}\left (2,-\frac {b x}{a}\right )+B g n \operatorname {PolyLog}\left (2,-\frac {d x}{c}\right ) \]

[Out]

A*f*x-B*g*n*ln(x)*ln(1+b*x/a)+B*f*(b*x+a)*ln(e*((b*x+a)/(d*x+c))^n)/b+g*ln(x)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))-
B*(-a*d+b*c)*f*n*ln(d*x+c)/b/d+B*g*n*ln(x)*ln(1+d*x/c)-B*g*n*polylog(2,-b*x/a)+B*g*n*polylog(2,-d*x/c)

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2608, 2535, 31, 2545, 2354, 2438} \[ \int \left (f+\frac {g}{x}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=g \log (x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}-\frac {B f n (b c-a d) \log (c+d x)}{b d}-B g n \operatorname {PolyLog}\left (2,-\frac {b x}{a}\right )-B g n \log (x) \log \left (\frac {b x}{a}+1\right )+A f x+B g n \operatorname {PolyLog}\left (2,-\frac {d x}{c}\right )+B g n \log (x) \log \left (\frac {d x}{c}+1\right ) \]

[In]

Int[(f + g/x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]),x]

[Out]

A*f*x - B*g*n*Log[x]*Log[1 + (b*x)/a] + (B*f*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n])/b + g*Log[x]*(A + B*Log
[e*((a + b*x)/(c + d*x))^n]) - (B*(b*c - a*d)*f*n*Log[c + d*x])/(b*d) + B*g*n*Log[x]*Log[1 + (d*x)/c] - B*g*n*
PolyLog[2, -((b*x)/a)] + B*g*n*PolyLog[2, -((d*x)/c)]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2354

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[Log[1 + e*(x/d)]*((a +
b*Log[c*x^n])^p/e), x] - Dist[b*n*(p/e), Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2535

Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))^(p_.), x_Symbol] :> Simp[(a +
 b*x)*((A + B*Log[e*((a + b*x)/(c + d*x))^n])^p/b), x] - Dist[B*n*p*((b*c - a*d)/b), Int[(A + B*Log[e*((a + b*
x)/(c + d*x))^n])^(p - 1)/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, A, B, n}, x] && NeQ[b*c - a*d, 0] && IGtQ
[p, 0]

Rule 2545

Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))/((f_.) + (g_.)*(x_)), x_Symbo
l] :> Simp[Log[f + g*x]*((A + B*Log[e*((a + b*x)/(c + d*x))^n])/g), x] + (-Dist[b*B*(n/g), Int[Log[f + g*x]/(a
 + b*x), x], x] + Dist[B*d*(n/g), Int[Log[f + g*x]/(c + d*x), x], x]) /; FreeQ[{a, b, c, d, e, f, g, A, B, n},
 x] && NeQ[b*c - a*d, 0]

Rule 2608

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*(RGx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*
RFx^p])^n, RGx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, p}, x] && RationalFunctionQ[RFx, x] && RationalF
unctionQ[RGx, x] && IGtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (f \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+\frac {g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{x}\right ) \, dx \\ & = f \int \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx+g \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{x} \, dx \\ & = A f x+g \log (x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+(B f) \int \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx-(b B g n) \int \frac {\log (x)}{a+b x} \, dx+(B d g n) \int \frac {\log (x)}{c+d x} \, dx \\ & = A f x-B g n \log (x) \log \left (1+\frac {b x}{a}\right )+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}+g \log (x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+B g n \log (x) \log \left (1+\frac {d x}{c}\right )-\frac {(B (b c-a d) f n) \int \frac {1}{c+d x} \, dx}{b}+(B g n) \int \frac {\log \left (1+\frac {b x}{a}\right )}{x} \, dx-(B g n) \int \frac {\log \left (1+\frac {d x}{c}\right )}{x} \, dx \\ & = A f x-B g n \log (x) \log \left (1+\frac {b x}{a}\right )+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}+g \log (x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-\frac {B (b c-a d) f n \log (c+d x)}{b d}+B g n \log (x) \log \left (1+\frac {d x}{c}\right )-B g n \text {Li}_2\left (-\frac {b x}{a}\right )+B g n \text {Li}_2\left (-\frac {d x}{c}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.94 \[ \int \left (f+\frac {g}{x}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=A f x+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}+g \log (x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-\frac {B (b c-a d) f n \log (c+d x)}{b d}-B g n \left (\log (x) \left (\log \left (1+\frac {b x}{a}\right )-\log \left (1+\frac {d x}{c}\right )\right )+\operatorname {PolyLog}\left (2,-\frac {b x}{a}\right )-\operatorname {PolyLog}\left (2,-\frac {d x}{c}\right )\right ) \]

[In]

Integrate[(f + g/x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]),x]

[Out]

A*f*x + (B*f*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n])/b + g*Log[x]*(A + B*Log[e*((a + b*x)/(c + d*x))^n]) - (
B*(b*c - a*d)*f*n*Log[c + d*x])/(b*d) - B*g*n*(Log[x]*(Log[1 + (b*x)/a] - Log[1 + (d*x)/c]) + PolyLog[2, -((b*
x)/a)] - PolyLog[2, -((d*x)/c)])

Maple [F]

\[\int \left (f +\frac {g}{x}\right ) \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )d x\]

[In]

int((f+g/x)*(A+B*ln(e*((b*x+a)/(d*x+c))^n)),x)

[Out]

int((f+g/x)*(A+B*ln(e*((b*x+a)/(d*x+c))^n)),x)

Fricas [F]

\[ \int \left (f+\frac {g}{x}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int { {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )} {\left (f + \frac {g}{x}\right )} \,d x } \]

[In]

integrate((f+g/x)*(A+B*log(e*((b*x+a)/(d*x+c))^n)),x, algorithm="fricas")

[Out]

integral((A*f*x + A*g + (B*f*x + B*g)*log(e*((b*x + a)/(d*x + c))^n))/x, x)

Sympy [F]

\[ \int \left (f+\frac {g}{x}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int \frac {\left (A + B \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}\right ) \left (f x + g\right )}{x}\, dx \]

[In]

integrate((f+g/x)*(A+B*ln(e*((b*x+a)/(d*x+c))**n)),x)

[Out]

Integral((A + B*log(e*(a/(c + d*x) + b*x/(c + d*x))**n))*(f*x + g)/x, x)

Maxima [F]

\[ \int \left (f+\frac {g}{x}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int { {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )} {\left (f + \frac {g}{x}\right )} \,d x } \]

[In]

integrate((f+g/x)*(A+B*log(e*((b*x+a)/(d*x+c))^n)),x, algorithm="maxima")

[Out]

B*f*n*(a*log(b*x + a)/b - c*log(d*x + c)/d) + B*f*x*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) + A*f*x - B*g*integ
rate(-(log((b*x + a)^n) - log((d*x + c)^n) + log(e))/x, x) + A*g*log(x)

Giac [F]

\[ \int \left (f+\frac {g}{x}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int { {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )} {\left (f + \frac {g}{x}\right )} \,d x } \]

[In]

integrate((f+g/x)*(A+B*log(e*((b*x+a)/(d*x+c))^n)),x, algorithm="giac")

[Out]

integrate((B*log(e*((b*x + a)/(d*x + c))^n) + A)*(f + g/x), x)

Mupad [F(-1)]

Timed out. \[ \int \left (f+\frac {g}{x}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int \left (f+\frac {g}{x}\right )\,\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right ) \,d x \]

[In]

int((f + g/x)*(A + B*log(e*((a + b*x)/(c + d*x))^n)),x)

[Out]

int((f + g/x)*(A + B*log(e*((a + b*x)/(c + d*x))^n)), x)